﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using OA.Model;
using OA.Utility;
using System.Reflection;

namespace OA.Web.Project.Handler
{
    /// <summary>
    /// $codebehindclassname$ 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class ComboboxData : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            JsonReq req = JsonHelper.JsonDeserialize<JsonReq>(JsonHelper.GetPostString());
            Assembly assembly = Assembly.LoadFrom(req.AssemblyName);
            object obj = assembly.CreateInstance(req.ClassName, true);
            object data = obj.GetType().InvokeMember(req.Method, BindingFlags.Public | BindingFlags.Instance,
                                           null, obj, null);
            if(data!=null)
            {
                Type t1 = obj.GetType();
               
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}
